package com.etc.classdemo;

/**
 * @author: knowno
 * @create: 2024-09-09 17:20
 * @Version 1.0
 **/
public class TestClass {
    public static void main(String[] args) throws ClassNotFoundException {

        //1 通过Class.forName
        Class c = Class.forName("com.etc.stringdemo.Ex2");

        //2. 某个对象
        Object o = new Object();
        Class<?> aClass = o.getClass();

        //3 通过某个类.class

        Class<String> stringClass = String.class;
    }
}
